import logging
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager
from flask import Flask
from flask import current_app
from flask import session
from info import create_app,db,models

# 获取app应用程序对象
app = create_app("develop")

# 1.创建Migrate对象,关联app,db
Migrate(app,db)

# 2.创建Manager对象,关联
manager = Manager(app)

# 3.给manger添加操作命令
# manager.add_command("db,MigrateCommand")
manager.add_command("db",MigrateCommand)


if __name__ == '__main__':
    manager.run()
